package com.tubi.demo;

public class demo {
    public static void main(String[] args) {
        /*
        需求 又一个字符串"22 34 43 54 11"， 将其中的每一个数存到int类型数组中
         */
        String s = "22 34 43 54 11";
        String[] arrS = s.split(" ");
        int[] ints = new int[arrS.length];

        for (int i = 0; i < arrS.length; i++) {
            int a = Integer.parseInt(arrS[i]);
            ints[i] = a;
        }
        for (int i = 0; i < ints.length; i++) {
            System.out.println(ints[i]);
        }
    }
}
